package com.wande.dataplatform.filecollection.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wande.common.tenant.core.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 文件采集规则实体
 *
 * @author wande
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("dp_collection_rule")
public class CollectionRule extends TenantEntity {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 规则名称
     */
    private String ruleName;

    /**
     * 规则编码
     */
    private String ruleCode;

    /**
     * 文件类型(CSV/XLS/XLSX/XML/JSON/SQL)
     */
    private String fileType;

    /**
     * 来源类型(LOCAL/FTP/SFTP/HTTP/OSS)
     */
    private String sourceType;

    /**
     * 来源配置(JSON格式)
     */
    private String sourceConfig;

    /**
     * 调度类型(REALTIME/HOURLY/DAILY/WEEKLY/MONTHLY/MANUAL)
     */
    private String scheduleType;

    /**
     * 调度配置(Cron表达式)
     */
    private String scheduleConfig;

    /**
     * 目标数据库
     */
    private String targetDatabase;

    /**
     * 目标表
     */
    private String targetTable;

    /**
     * 入库策略(OVERWRITE/APPEND/UPSERT)
     */
    private String loadStrategy;

    /**
     * 状态(ENABLED/DISABLED)
     */
    private String status;

    /**
     * 映射规则ID
     */
    private Long mappingRuleId;

    /**
     * DolphinScheduler任务ID
     */
    private Long dsTaskId;
}
